-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm less
is link before using it as such
#820
Conversation
The PHP [docs](https://www.php.net/manual/en/function.readlink.php) of `readlink()` indicate that if the path provided is not a link, it fails. > Note: The function fails if path is not a symlink, except on Windows, where the normalized path will be returned.
Just discovered that the reason
which then clobbers the symlink:
Would still love this to be merged, though; it'll help stabilize in different environments. |
that |
Yes, I imagine that is Laravel. In combination with PHP 8, the It seems like defensive programming to first check if it is a link before treating it as such. Do you agree with that? |
yeah, it's reasonable to check first. if we're going to do that, we should wrap this whole thing in a conditional block, rather than using a ternary to fall back to the actual less path. this line of code is trying to say "if |
I've updated that in 0c59c2d. |
Thanks! |
@bobthecow How soon/frequently do you do releases? I'd love to upgrade to get this change in our app. |
There's no set cadence, but it's probably about time. I'll get this released in the next few days. |
The PHP docs of
readlink()
indicate that if the path provided is not a link, it fails.I am seeing this in Docker with PHP FPM image, with Alpine 3.20.3, PHP 8.2.23: